ICollectionEx
Ecng.Collections
Provides an extended set of methods and events for collections of a specified type.
Implementa: ICollection<T>, IEnumerable<T>, IEnumerable
Métodos
AddRange
public void AddRange(IEnumerable<T> items)
iCollectionEx.AddRange(items)
Adds a range of elements to the collection.
- items
- The elements to add.
RemoveRange
public void RemoveRange(IEnumerable<T> items)
iCollectionEx.RemoveRange(items)
Removes a range of elements from the collection.
- items
- The elements to remove.
RemoveRange
public int RemoveRange(int index, int count)
result = iCollectionEx.RemoveRange(index, count)
Removes a specified number of elements starting at a certain index.
- index
- The starting index.
- count
- The number of elements to remove.
Devuelve: The number of removed elements.
Eventos
AddedRange
public event Action<IEnumerable<T>> AddedRange
iCollectionEx.AddedRange += handler
Occurs when a range of elements is added.
RemovedRange
public event Action<IEnumerable<T>> RemovedRange
iCollectionEx.RemovedRange += handler
Occurs when a range of elements is removed.